<?php
/**
 * The template for displaying Archives.
 *
 * @package Behold
 * @since Behold 1.0.0
 */
?>


<?php
	get_header();
		if ( have_posts() ) :
?>
		<h3 id="archive-type-title">
			<?php if ( ( is_day() ) ) :
				printf( __( 'Daily Archives: %s', 'Behold' ), '<span>' . get_the_date() . '</span>' ); 
			elseif ( is_month() ) :
				printf( __( 'Monthly Archives: %s', 'Behold' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'Behold' ) ) . '</span>' );
			elseif ( is_year() ) :
				printf( __( 'Yearly Archives: %s', 'Behold' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'Behold' ) ) . '</span>' );
			else : 
				_e( 'Blog Archives', 'Behold' );
			endif;
			?>
		</h3>
<?php
	behold_post_navigation( "nav-above" );
	endif;
?>

<div id="main" class="group">
	<div id="posts-container">
		<?php
		if ( have_posts() ) :
			while ( have_posts() ) :
				the_post();		
				if ( get_post_format() == "gallery" ):
					get_template_part( 'content', 'gallery' );
				else:
					get_template_part( 'content' );
				endif;
		   endwhile;
		endif;
		?>
	</div>	<!-- closing of posts-container> -->
	<?php
		if ( have_posts () ):
			behold_post_navigation( "nav-below" );
		endif;
	?>
</div><!-- Closing of main -->

<?php
	get_sidebar("right");
	get_footer(); 
?>
